Maximum (fld), Maximum (fld, condFld), Maximum (fld, condFld, cond), Maximum (x)

Basic and Crystal syntax.

Arguments
Returns

Fractional Number

Action

Enables you to find the maximum value that appears in a set of values. For example:

Examples

The following examples are applicable to both Basic and Crystal syntax:

Maximum({orders.ORDER AMOUNT})

Returns the highest value in the Amount field.

Maximum({orders.AMOUNT}, {orders.CUSTOMER ID})

Identifies the largest order in each group of orders in the Amount field (the largest order for each month). The orders are separated into groups whenever the value in the Customer ID field changes.

Maximum({orders.AMOUNT}, {orders.ORDER DATE}, "monthly")

Identifies the largest order in each group of orders in the Amount field (the largest order for each month). The orders are separated into groups whenever the value in the Date field changes to a new month.

The following example is applicable to Crystal syntax:

Maximum also allows you to set a floor on a calculation. For example: Maximum([{file.BALANCE}, 500]) sets a floor of 500 on the calculation. The expression will always return the balance unless the balance drops below 500. Then it will return the floor amount of 500. Thus:

Maximum([{file.PROFITS}, 500]) = {file.PROFITS}

Where Profits > 500.

Note:    Using this function in a formula forces the formula to be evaluated at print time.

For more information on evaluation time considerations, see Evaluation Time functions.



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com